@extends('layouts.backend')
@section('title')
    编辑角色
@endsection

@section('body')
    <div class="row">
        <div class="ibox">
            <div class="ibox-title">
                <h5>编辑角色</h5>
                <a href="{{route('backend.role.index')}}" class="btn btn-primary pull-right">返回列表</a>
                <div class="clearfix"></div>
            </div>
            <div class="ibox-content">

                <div class="row">
                    <div class="col-md-8">
                        <form method="post" class="form-horizontal" >
                            @csrf
                            <input type="hidden" name="_method" value="PUT">
                            <div class="form-group">
                                <label >角色名称@include('components.backend.required')</label>
                                <input type="text" name="name" value="{{$role->name}}" placeholder="请输入角色名称" class="form-control" required>
                            </div>
                            <div class="form-group">
                                <label>所属模块 @include('components.backend.required')</label>
                                <select name="guard_name" class="form-control" >
                                    <option @if($role->guard_name == 'admin') selected @endif value="admin">后台</option>
                                    <option @if($role->guard_name == 'user') selected @endif  value="user">前台</option>
                                </select>
                            </div>

                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-2 pull-right">
                                    <button class="btn btn-primary" type="submit">提交</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>

            </div>
        </div>
    </div>
@endsection
